<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>车险投保</title>
    <%@include file="/WEB-INF/views/commons/commons.jsp" %>
    <script type="text/javascript" src="/static/js/system/carInsurance.js"></script>

</head>
<body>
    <div id="aa" class="easyui-accordion" data-options="animate:true, selected:true, fit:true">
        <div title="投保人" data-options="selected:true"
             style="overflow:auto;padding:10px;height: 10px">
            <div class="easyui-panel" fit="true">
                <form id="latent_form" method="post">
                    <input type="hidden" name="id"/>
                    <table style="margin-left: 30px">
                        <tbody>
                        <div style="margin-top: 30px"></div>
                        <tr style="height: 40px">
                            <td>客户姓名:</td>
                            <td width="250px">
                                <input name="name" class="easyui-validatebox" data-options="required: true,missingMessage:'投保人姓名必须填写'"/>
                            </td>
                            <td>性别：</td>
                            <td width="250px">
                                <input name="gender" class="easyui-combobox" style="width: 80px" value="男"
                                       data-options="valueField:'value', textField:'text',
                               data:[{text:'男', value:'0'},{text:'女', value:'1'}], panelHeight:'auto'"/>
                            </td>
                            <td>身份证：</td>
                            <td width="250px">
                                <input name="idNumber" class="easyui-validatebox" data-options="required: true,validType:'minLength[18]', missingMessage:'身份证号码至少为18位'"/>
                            </td>
                        </tr>
                        <tr style="height: 40px">
                            <td>联系方式:</td>
                            <td width="250px">
                                <input name="email" class="easyui-validatebox" data-options="required: true,missingMessage:'联系方式必须填写'"/>
                            </td>
                        </tr>
                        <tr style="height: 40px">
                            <td>通讯地址:</td>
                            <td width="250px">
                                <input name="address" style="width: 250px" class="easyui-textbox"/>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                    <table style="margin-left: 30px">
                        <tbody>
                        <tr>
                            <th>
                                <a class="easyui-linkbutton" data-options="iconCls:'icon-search'"
                                   data-cmd="chooseLatent" text="会员客户"></a>
                            </th>
                        </tr>
                        </tbody>
                    </table>
                </form>
            </div>
        </div>
        <div title="车辆信息" data-options="selected:true" style="padding:10px;">
            <div class="easyui-panel" fit="true">
                <form id="car_form" method="post">
                    <input type="hidden" name="id"/>
                    <table style="margin-left: 30px">
                        <tbody>
                        <div style="margin-top: 30px"></div>
                        <tr style="height: 40px">
                            <td width="80px">车主姓名:</td>
                            <td width="250px">
                                <input name="owner" id="user_name_label" class="easyui-validatebox" data-options="required: true,missingMessage:'车主姓名必须填写'"/>
                            </td>
                            <td width="80px">汽车品牌：</td>
                            <td width="250px">
                                <input name="brand" class="easyui-textbox"/>
                            </td>
                            <td width="80px">汽车型号：</td>
                            <td width="250px">
                                <input name="model" class="easyui-textbox"/>
                            </td>
                        </tr>
                        <tr style="height: 40px">
                            <td width="80px">车牌号码:</td>
                            <td width="250px">
                                <input name="number" class="easyui-validatebox" data-options="required: true,missingMessage:'车牌号码必须填写'"/>
                            </td>
                            <td width="80px">排气量：</td>
                            <td width="250px">
                                <input name="gas" class="easyui-textbox"/>
                            </td>
                            <td width="80px">汽车分类：</td>
                            <td width="250px">
                                <input name="type" class="easyui-combobox"
                                       data-options="valueField:'value', textField:'text',
                               data:[{text:'载物', value:'0'},{text:'载人', value:'1'}], panelHeight:'auto'"/>
                            </td>
                        </tr>
                        <tr style="height: 40px">
                            <td width="80px">购置日期:</td>
                            <td width="250px">
                                <input name="purchaseDate" id="endDate_max" class="easyui-datebox"/>
                            </td>
                            <script>
                                $(function(){
                                    $('#endDate_max').datebox().datebox('calendar').calendar({
                                        validator: function(date){
                                            var now = new Date();
                                            return date <= now;
                                        }
                                    });
                                });
                            </script>
                            <td width="80px">市场估价：</td>
                            <td width="250px">
                                <input name="price" class="easyui-textbox"/>
                            </td>
                            <td width="80px">车载大小：</td>
                            <td width="250px">
                                <input name="loadSize" class="easyui-combobox"
                                       data-options="valueField:'value', textField:'text',
                                       data:[
                                       {text:'小型', value:'0'},
                                       {text:'中型', value:'1'},
                                       {text:'大型', value:'2'}],panelHeight:'auto'"/>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                    <table style="margin-left: 30px">
                        <tbody>
                        <tr>
                            <th>
                                <a class="easyui-linkbutton" data-options="iconCls:'icon-search'"
                                   data-cmd="chooseCar" text="常见车型选择"></a>
                            </th>
                        </tr>
                        </tbody>
                    </table>
                </form>
            </div>
        </div>
        <div title="保险产品">
            <div class="easyui-panel" fit="true">
                <form id="productInfo_form" method="post">
                    <input type="hidden" name="id"/>
                    <table style="margin-left: 30px">
                        <tbody>
                        <div style="margin-top: 30px"></div>
                        <tr style="height: 40px">
                            <td>承保机构:</td>
                            <td width="10px">
                            <td>
                                <input id="agency" name="id" class="easyui-combobox" style="width: 200px"
                                       prompt="请选择承保机构"
                                       data-options="valueField:'id', textField:'name',
                               url:'/company/selectByTeamWork', panelHeight:'auto'"/>
                            </td>
                            <td width="10px"></td>
                            <td>
                                <a class="easyui-linkbutton" data-options="iconCls:'icon-add'"
                                   data-cmd="addProduct" text="添加产品"></a>
                            </td>
                            <td width="10px"></td>
                            <td width="80px">保险时长：</td>
                            <td width="10px">
                                <input id="burningTime" name="burningTime" class="easyui-validatebox" data-options="required: true,missingMessage:'请填写需要保障的年限'"/>
                            </td>
                            <td width="5px"></td>
                            <td>年</td>
                        </tr>
                        </tbody>
                    </table>
                    <table id="pro_datagrid"></table>
                    <table align="center">
                        <tbody>
                        <tr>
                            <th>
                                总计<span id="totalAmount" style="color: red;font-size: 60px">0</span>元
                            </th>
                        </tr>
                        </tbody>
                    </table>
                    <table align="center">
                        <tbody>
                        <tr>
                            <th>
                                <a class="easyui-linkbutton" id="submitBtn" style="background-color: #1b8cf2;color: white"
                                   data-options="width:300" text="暂存保单"></a>
                            </th>
                        </tr>
                        </tbody>
                    </table>
                </form>
            </div>
        </div>
    </div>
<%--投保人--%>
<div id="latent_dialog">
    <table id="latent_datagrid"></table>
</div>
<div id="latent_btn" align="right">
    <a class="easyui-linkbutton" iconCls="icon-save" plain="true" data-cmd="latent_save">确定</a>
</div>
<%--车辆信息--%>
<div id="car_dialog">
    <table id="car_datagrid"></table>
</div>
<div id="car_btn" align="right">
    <a class="easyui-linkbutton" iconCls="icon-save" plain="true" data-cmd="car_save">确定</a>
</div>
<%--保险产品--%>
<div id="productInfo_dialog">
    <table id="productInfo_datagrid"></table>
</div>
<div id="productInfo_btn" align="right">
    <a class="easyui-linkbutton" iconCls="icon-save" plain="true" data-cmd="productInfo_save">确定</a>
</div>


<%--删除按钮--%>
<div id="remove_btn" align="right">
    <a class="easyui-linkbutton" iconCls="icon-remove" plain="true" data-cmd="productInfo_remove">删除</a>
</div>
</body>
</html>
